-----------------------------------------------------
README for: Incentivizing Demand for Supply-Constrained Care: Institutional Birth in India
The Review of Economics and Statistics
By: Alison Andrew and Marcos Vera Hernandez
Questions: alison_a@ifs.org.uk

yyyy-mm-dd: 2022-05-18
-------------------------------

>>>>> REPLICATION INSTRUCTIONS
The materials provided here replicate all results in the paper �Incentivizing Demand for Supply-Constrained Care: Institutional Birth in India�. In part (1), we outline how to obtain the data needed. In part (2), we give an overview of the STATA code used to run the analysis. 

1. INSTRUCTIONS FOR OBTAINING DATA
----------------------------------
This paper uses a number of different data sources. These are all available to researchers under various license agreements. Below, we document each source and where it can be obtained from. To reproduce all analysis, researchers must first download these different datasets and then change the globals in the �MASTER DO FILE� do-file to indicate the location of these raw datasets. 

1.1. DLHS-3,
This data contains the main outcomes variables used in this analysis. Details on how to obtain the data are provided here: http://rchiips.org/obtainingdata.html. The researcher must download and rename the following datasets: 
- Ever married women�s dataset � to be renamed to �Ever married  women (15-49 years)�
- Household dataset � to be renamed to �Household�
- Unmarried women dataset � to be renamed to �Unmarried women (15-24 years)�
- Village dataset � to be renamed to �Village�

1.2. DLHS-2
We use this data to check for differential pretrends in key outcomes. Details on how to obtain the data are provided here: http://rchiips.org/obtainingdata.html. The researcher must download and rename the following datasets: 
- Ever married women�s dataset � to be renamed to �INDIA_WOMEN�
- Household dataset � to be renamed to �INDIA_HH�

1.3. DLHS-2 FACILITY SURVEY
We use this data to construct district health-system capacity. Details on how to obtain the data are provided here: http://rchiips.org/obtainingdata.html. The researcher must download and rename the following datasets: 
- Community Health Centres � to be renamed to �CHC�
- District Hospitals � to be renamed to �DH�
- First Referral Units � to be renamed to �FRU�
- Primary Health Centres � to be renamed to �PHC�
- Sub-Centres � to be renamed to �SC�

1.4. NFHS-4
We use this data for our tentative analysis of the medium-run effects of JSY. The data can be obtained from here: https://dhsprogram.com/methodology/survey/survey-display-355.cfm The researcher must download and rename the following datasets: 
- Birth roster � to be renamed to �Births�
- Household data � to be renamed to �Household�
- Couples data � to be renamed to �Couples�


1.5. DATA FOR CONSTRUCTING HEALTH CAPACITY PER PERSON. 
These datasets are all uploaded in the �num_facilities_per_district� folder. We use this data to convert the number of doctors, nurses and beds to a per person measure. This requires 2 steps: 

1.5.1. Scaling resources in primary health facilities by the number of primary health facilities in each district. We downloaded data on the number of health facilities per district from data.gov.in. We provide the data as part of this replication package in two files: 
1.5.1.1. �Data on Health centres - rural health statistics � 2004� � this data is used to scale primary health capacity in all districts outside of West Bengal which (to reasons unknown to us) is not included in this data. We obtained this data by downloading it from: https://data.gov.in/resource/district-wise-availability-health-centres-india-sept-2004
1.5.1.2. �Data on Health centres - rural health statistics � 2006� � we use the 2006 figures for West Bengal since 2004 figures are not available. We obtained this data by downloading it from: https://data.gov.in/resource/district-wise-availability-health-centres-india-rhs-2006

1.5.2. We use information on the rural population of each district from the 2001 census to convert capacity into capacity per person. �2001 census data�
	

2. INSTRUCTIONS FOR RUNNING DO FILES
-------------------------------------
The �do-files� folder contains all do-files required to reproduce results in the paper �Incentivizing Demand for Supply-Constrained Care: Institutional Birth in India�. We used STATA version 17 to run all do-files.

The �MASTER DO FILE� file runs all cleaning and analysis do-files in the correct order. Globals in this master do file need to be changed to the correct data directories and then everything should run. Below we provide a brief summary of what each do-file called by this master file does:

2.1. "$do\programs.do" � this defines several programs that we use in the subsequent analysis. These programs automate the reweighing to event-time treatment effect estimates and draw event-study graphs. 

2.2. "$do\clean_births_dlhs3.do" � this cleans data from the DLHS-3 birth roster

2.3. "$do\clean_jsy_startdates_dlhs3.do" � this estimates in which quarter JSY started in each district. This additionally generates: 
- Figure A3

2.4. "$do\clean_vaccinations_dlhs3.do" � this cleans children�s vaccination data from the DLHS-3

2.5. "$do\clean_household_dlhs3.do" � this cleans background household characteristics from the DLHS-3

2.6. "$do\clean_create_analysis_datasets.do" � this merges together cleaned datasets to create an analysis dataset for the mortality and institutional delivery analysis 

2.7. "$do\clean_district_admin" � this cleans data on the number of health facilities per district and population per district, including renaming districts to facilitate a string merge on district name 

2.8. "$do\clean_healthfacilities_dlhs2" � this cleans data from the DLHS-2 health facilities survey

2.9. "$do\clean_district_capacity" � this merges together clean data on health facilities and constructs district-level capacity measures in the primary and secondary health systems

2.10. "$do\clean_mort_pretrends_dlhs2" � this cleans the DLHS-2 birth rosters that we use to check for differential pre-trends

2.11. "$do\clean_vacc_pretrends_dlhs2" � this cleans the DLHS-2 vaccination information that we use to check for differential pre-trends

2.12. "$do\clean_instdel_pretrends_dlhs2" � this cleans the DLHS-2 institutional delivery data 

2.13. "$do\clean_create_long_differences" � this takes the cleaned DLHS-3 data and creates long-differences in mortality, institutional delivery and vaccination rates to check for differential pretrends. 

2.14. "$do\clean_create_analysis_datasets_vaccines" � this merges together cleaned datasets to create an analysis dataset for the vaccination analysis

2.15. "$do\clean_other_dlhs2_district_chars" � this cleans other DLHS-2 district characteristics which we then use for exploratory heterogeneity analysis


2.16. "$do\clean_av_distance" � this calculates distances from each household to health facilities. We use this measure in the exploratory heterogeneity analysis. 

2.17. "$do\analysis_mort" � this performs all analysis that uses perinatal mortality as an outcome. It produces results for the following tables/figures: 

- Table 2
- Table 3
- Figure 4
- Table A1
- Table A4
- Table A6
- Table A8
- Table A10
- Table A12
- Table A14
- Table A15
- Table A16
- Table A17
- Figure A1
- Figure A8
- Figure A9


2.18. "$do\analysis_instdel" � this performs all analysis that uses institutional delivery as an outcome. It produces results for the following tables/figures:
- Table 2
- Table A3
- Table A5
- Table A7
- Table A9
- Table A11
- Table A13
- Figure 4
- Figure A7

2.19. "$do\analysis_vacc" - this performs all analysis that uses vaccinations as an outcome. It produces results for the following tables/figures:
- Table 4
- Table A18
- Table A19
- Table A20
- Figure A10

2.20. "$do\analysis_vacc_bounds" � this performs our analysis bounding the impact on vaccinations for different levels of differential survival by JSY. It produces results for: 
- Table A23

2.21. "$do\analysis_mort_pretrends" � this checks for differential pretrends in 7-day mortality. It produces results for: 
- Table A2
- Figure A4

2.22. "$do\analysis_instdel_pretrends" � this checks for differential pretrends in institutional delivery. It produces results for:
- Figure A5

2.23. "$do\analysis_vacc_pretrends" � this checks for differential pretrends in vaccinations. It produces results for:
- Figure A6

2.24. "$do\mediumrun_effects" -  this performs our (tentative) analysis for medium-run effects. It produces results for: 
- Table 5

